#include <stdio.h>

int main(int x, int k){
    printf("hello");
    scanf("%d %d",&x,&k);
    printf("%d %d",x,k);
    int xsrl = (unsigned)x>>k; 
    int w = 8*sizeof(x);
    printf("%d", (((1u<<(w-1)& x)&&1)*(-1<<(w-k)))|xsrl);
    return 0;


}